package com.Utils;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelReader;
import com.alibaba.excel.read.metadata.ReadSheet;
import com.listener.ChangeDataListener;
import com.pojo.LocationPojo;

/**
 * @version:java version 1.8
 * @Author:gzt
 * @description: excel转json
 * @date:2023-06-1415:52
 */
public class ChangeData {
    public static void main(String[] args) {
        String filePath = "F:\\desktop\\projectNow\\study\\新建 XLS 工作表.xls";
        ExcelReader excelReader = EasyExcel.read(filePath, LocationPojo.class, new ChangeDataListener()).build();
        ReadSheet readSheet = EasyExcel.readSheet(0).build();
        excelReader.read(readSheet);
        excelReader.finish();
    }
}
